CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
BINDIR = $(DESTDIR)@BINDIR@

VPATH=.:os

OBJECTS = action.o background.o binding.o border.o button.o client.o \
   clientlist.o clock.o color.o command.o confirm.o cursor.o debug.o \
   default.o desktop.o dock.o event.o error.o font.o grab.o gradient.o \
   group.o help.o hint.o icon.o image.o lex.o main.o match.o menu.o misc.o \
   move.o outline.o pager.o parse.o place.o popup.o render.o resize.o \
   rootmenu.o screen.o settings.o spacer.o swallow.o taskbar.o \
   timing.o tray.o traybutton.o winmenu.o

EXE = xwm

all: $(EXE)

install: all
	install -d $(BINDIR)
	install $(EXE) $(BINDIR)/$(EXE)

install-strip: install
	strip $(BINDIR)/$(EXE)

uninstall:
	rm -f $(BINDIR)/$(EXE)

$(EXE): $(OBJECTS)
	$(CC) -o $(EXE) $(OBJECTS) $(LDFLAGS)

.c.o:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<

$(OBJECTS): *.h ../config.h

clean:
	rm -f $(OBJECTS) $(EXE) core

